const BASE_URL = 'http://123.207.32.32:9001'
class Request {
  request(url,method,data){
    return new Promise((resolve,reject) => {
      wx.request({
        url:`${BASE_URL}${url}`,
        method,
        data,
        success(res){
          resolve(res.data)
        },
        fail(err){
          reject(err)
        }
      })
    })
  }
  get(url,data){
    return this.request(url,'GET',data)
  }
}
export default new Request()